using Admin.NET.Core;
using MOKA.TPM.Entity;
using System.ComponentModel.DataAnnotations;

namespace MOKA.TPM.Service.Dto;

/// <summary>
/// 页面输出参数 （调拨主表）
/// </summary>
public class PartMoveMOutput : PartMoveM
{
    /// <summary>
    /// 调拨类型 （字典名称）
    /// </summary>
    public string? MoveTypeName { get; set; }

    /// <summary>
    /// 调拨状态 （字典名称）
    /// </summary>
    public string? MoveStatusName { get; set; }

    /// <summary>
    /// 原车间 （字典名称）
    /// </summary>
    public string? WorkshopName { get; set; }

    /// <summary>
    /// 到车间 （字典名称）
    /// </summary>
    public string? ToWorkShopName { get; set; }

    /// <summary>
    /// 关联对象等
    /// </summary>
    //public string? WePartyLevelName { get; set; }
}

/// <summary>
/// 单ID查询参数
/// </summary>
public class PartMoveMInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string? BillNo { get; set; }
}

/// <summary>
/// 普通查询参数
/// </summary>
public class GetPartMoveMInput : BaseOrderInput
{
}

/// <summary>
/// 分页查询参数
/// </summary>
public class PagePartMoveMInput : BasePageInput
{
}

/// <summary>
/// 新增记录参数
/// </summary>
public class AddPartMoveMInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [Required, MaxLength(50)]
    public string BillNo { get; set; } = string.Empty;

    /// <summary>
    /// 调拨类型
    /// </summary>
    public Guid MoveType { get; set; }

    /// <summary>
    /// 调拨状态
    /// </summary>
    public Guid MoveStatus { get; set; }

    /// <summary>
    /// 调拨时间
    /// </summary>
    public DateTime MoveTime { get; set; }

    /// <summary>
    /// 原车间
    /// </summary>
    public Guid Workshop { get; set; }

    /// <summary>
    /// 到车间
    /// </summary>
    public Guid ToWorkShop { get; set; }

    /// <summary>
    /// 确认人
    /// </summary>
    [MaxLength(50)]
    public string? ConMan { get; set; }

    /// <summary>
    /// 确认人姓名
    /// </summary>
    [MaxLength(50)]
    public string? ConManName { get; set; }

    /// <summary>
    /// 确认时间
    /// </summary>
    public DateTime? ConTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Remark { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    [Required, MaxLength(20)]
    public string CreateUser { get; set; } = string.Empty;

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    [MaxLength(20)]
    public string? UpdateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 子表：调拨明细
    /// </summary>
    public List<PartMoveD> PartMoveDs { get; set; }//一对多
}

/// <summary>
/// 更新参数
/// </summary>
public class UpdatePartMoveMInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [MaxLength(50)]
    public string BillNo { get; set; }

    /// <summary>
    /// 调拨类型
    /// </summary>
    public Guid MoveType { get; set; }

    /// <summary>
    /// 调拨状态
    /// </summary>
    public Guid MoveStatus { get; set; }

    /// <summary>
    /// 调拨时间
    /// </summary>
    public DateTime MoveTime { get; set; }

    /// <summary>
    /// 原车间
    /// </summary>
    public Guid Workshop { get; set; }

    /// <summary>
    /// 到车间
    /// </summary>
    public Guid ToWorkShop { get; set; }

    /// <summary>
    /// 确认人
    /// </summary>
    [MaxLength(50)]
    public string? ConMan { get; set; }

    /// <summary>
    /// 确认人姓名
    /// </summary>
    [MaxLength(50)]
    public string? ConManName { get; set; }

    /// <summary>
    /// 确认时间
    /// </summary>
    public DateTime? ConTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Remark { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    [MaxLength(20)]
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    [MaxLength(20)]
    public string? UpdateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 子表：调拨明细
    /// </summary>
    public List<PartMoveD> PartMoveDs { get; set; }//一对多
}

/// <summary>
/// 删除参数
/// </summary>
public class DeletePartMoveMInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string BillNo { get; set; }
}

/// <summary>
/// 更新部分数据参数
/// </summary>
public class UpdateSomePartMoveMInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string BillNo { get; set; }
}